#!/bin/sh

#
# Generates the config.h file used by the OS src.
#

if [ $# -eq 0 -o $# -gt 1 ]; then
    echo "Usage: "
    echo "  ./genconfig.sh <i386|x86-64>"
    exit 1;
fi

if [ "$1" != "i386" -a "$1" != "x86-64" ]; then
    echo "Usage: "
    echo "  ./genconfig.sh <i386|x86-64>"
    exit 1;
fi

if [ "$1" = "i386" ]; then
    cat ../include/config-i386.h > ../include/config.h
elif [ "$1" = "x86-64" ]; then
    cat ../include/config-x86_64.h > ../include/config.h
fi